package com.leigq.www.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * The enum Kaf ka msg biz type.
 * @author leiguoqing
 */
@AllArgsConstructor
@Getter
public enum KafKaMsgBizType {

    /**
     * Order biz kaf ka msg biz type.
     */
    ORDER_BIZ(1)

    ;


    /**
     * The Biz type.
     */
    public final Integer code;


    public static KafKaMsgBizType getByCode(Integer code) {
        final KafKaMsgBizType[] values = KafKaMsgBizType.values();
        return Arrays.stream(values).filter(bizType -> Objects.equals(code, bizType.code)).findFirst().orElse(null);
    }

}
